home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
NRPAS13.ARJ
/
GAMMP.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-04-29
|
354b
|
16 lines
FUNCTION gammp(a,x: real): real;
VAR
gammcf,gln: real;
BEGIN
IF ((x < 0.0) OR (a <= 0.0)) THEN BEGIN
writeln('pause in GAMMP - invalid arguments'); readln
END;
IF (x < (a+1.0)) THEN BEGIN
gser(a,x,gammcf,gln);
gammp := gammcf
END ELSE BEGIN
gcf(a,x,gammcf,gln);
gammp := 1.0-gammcf
END
END;